doctype html
html.no-focus lang="en"
  head
    meta charset='utf-8'
    meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
    meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"
    meta name="renderer" content="webkit"
    meta http-equiv="cleartype" content="on"
    meta name="HandheldFriendly" content="True"
    meta name="MobileOptimized" content="320"
    - if content_for?(:title)
      = yield(:title)
    - else
      title 项目管理
    = csrf_meta_tags
    = action_cable_meta_tag
    = content_for?(:head) ? yield(:head) : ''
    = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload'
    = javascript_include_tag 'application', 'data-turbolinks-track': 'reload'


  body
    #main-menu
      .menus.pull-left.push-15-l
        = link_to '项目列表', projects_path
        - Project.select(:id, :name).each do |p|
          = link_to p.name, p, class: 'menu-top-link'
      .infos.pull-right.push-15-r
        = current_user.name||current_user.login
    .container
      .panel.panel-default.push-10-t
        .panel-heading
          .panel-title
            .html_title = @html_title
            - if content_for :html_buttons
              .pull-right= yield(:html_buttons)
        .panel-body
          = yield
    #application-modal.modal.application-modal aria-hidden="true" role="dialog" style="display: none;" tabindex="-1"
      .modal-dialog.modal-lg.modal-dialog-popout
        .modal-content
    #application-md-modal.modal.application-modal aria-hidden="true" role="dialog" style="display: none;" tabindex="-1"
      .modal-dialog.modal-dialog-popout
        .modal-content
    #application-sm-modal.modal.application-modal aria-hidden="true" role="dialog" style="display: none;" tabindex="-1"
      .modal-dialog.modal-sm.modal-dialog-popout
        .modal-content
  javascript:
    show_error(#{flash[:error].to_json.html_safe});
    show_notice(#{flash[:notice].to_json.html_safe});
